﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PloobsEngine.Publishers;

namespace PloobsEngine.Features
{
    public delegate void RedirectPicking(Object obj);

    public class PickingRedirectorCallbackObserver : IObserver 
    {        
        ConcreteObserver co;
        public event RedirectPicking redirectPicking = null;

        public PickingRedirectorCallbackObserver()            
        {
             co = new ConcreteObserver(this);
        }        

        public void Recieve(object obj)
        {
            if(redirectPicking!=null)
            redirectPicking(obj);
        }

        #region IObserver Members

        public void AddSubject(ISubject sub)
        {
            co.AddSubject(sub);
        }

        public void RemoveSubject(ISubject sub)
        {
            co.RemoveSubject(sub);
        }

        public void DetachFromAllSubjects()
        {
            co.DetachFromAllSubjects();
        }

        #endregion
    }
}
